package com.zzjson.dubbo.springboot.client;

import com.zzjson.dubbo.springboot.api.ISayHelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>****************************************************************************</p>
 * <p><b>Copyright © 2010-2020 shuncom team All Rights Reserved<b></p>
 * <ul style="margin:15px;">
 * <li>Description : com.zzjson.dubbo.client</li>
 * <li>Version     : 1.0.0</li>
 * <li>Creation    : 2020年05月20日</li>
 * <li>@author     : zzy0_0</li>
 * </ul>
 * <p>****************************************************************************</p>
 */
@RestController
public class DubboController {
	@Reference(mock = "com.zzjson.dubbo.springboot.client.mock.SayHelloServiceMock", timeout = 1, cluster = "failback")
	private ISayHelloService sayHelloService;

	@GetMapping("/hello")
	public String sayHello() {
		return sayHelloService.sayHello();
	}
}